package com.xhs.service;

/**
 * @desc: 抽象类-责任链
 * @projectName: tools-parent
 * @author: xhs
 * @date: 2022/12/5 10:35
 * @version: JDK 1.8
 */
public abstract class AbstractLevelHandler {

    /**
     * 下一个LevelHandler
     */
    protected AbstractLevelHandler nextLevelHandler;

    /**
     * 处理业务逻辑
     *
     * @return
     */
    public abstract Boolean doService();

    /**
     * 设置下一个LevelHandler
     *
     * @return
     */
    public void setNextLevelHandler(AbstractLevelHandler nextLevelHandler) {
        this.nextLevelHandler = nextLevelHandler;
    }
}
